package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.StoreProductPackageMapper;
import com.ruoyi.system.domain.StoreProductPackage;
import com.ruoyi.system.service.IStoreProductPackageService;

/**
 * 门店商品套餐 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-28
 */
@Service
public class StoreProductPackageServiceImpl implements IStoreProductPackageService
{
    @Autowired
    private StoreProductPackageMapper storeProductPackageMapper;

    /**
     * 通过id查询门店商品套餐
     *
     * @param id 门店商品套餐主键
     * @return 门店商品套餐
     */
    @Override
    public StoreProductPackage selectStoreProductPackageById(Long id)
    {
        return storeProductPackageMapper.selectStoreProductPackageById(id);
    }

    /**
     * 通过门店名称查询门店商品套餐列表
     *
     * @param storeName 门店名称
     * @return 门店商品套餐
     */
    @Override
    public List<StoreProductPackage> selectStoreProductPackageListByName(String storeName)
    {
        return storeProductPackageMapper.selectStoreProductPackageListByName(storeName);
    }

    /**
     * 新增门店商品套餐
     *
     * @param storeProductPackage 门店商品套餐
     * @return 结果
     */
    @Override
    public int insertStoreProductPackage(StoreProductPackage storeProductPackage)
    {
        return storeProductPackageMapper.insertStoreProductPackage(storeProductPackage);
    }

    /**
     * 修改门店商品套餐
     *
     * @param storeProductPackage 门店商品套餐
     * @return 结果
     */
    @Override
    public int updateStoreProductPackage(StoreProductPackage storeProductPackage)
    {
        return storeProductPackageMapper.updateStoreProductPackage(storeProductPackage);
    }

    /**
     * 通过id批量删除门店商品套餐信息
     *
     * @param ids 需要删除的门店商品套餐主键
     * @return 结果
     */
    @Override
    public int deleteStoreProductPackageByIds(Long[] ids)
    {
        return storeProductPackageMapper.deleteStoreProductPackageByIds(ids);
    }

    /**
     * 通过id删除门店商品套餐信息
     *
     * @param id 门店商品套餐主键
     * @return 结果
     */
    @Override
    public int deleteStoreProductPackageById(Long id)
    {
        return storeProductPackageMapper.deleteStoreProductPackageById(id);
    }
}
